package com.brunogb.pages.database;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

/**
 * @author Bruno Bilescky - brunogb@gmail.com
 * 
 */
public class PMF {

	private static PersistenceManagerFactory pmf;

	static {
		pmf = JDOHelper.getPersistenceManagerFactory("transactions-optional");
	}
	
	/**
	 * 
	 */
	private PMF() {}

	/**
	 * 
	 * @return
	 */
	public static PersistenceManagerFactory getPMF() {
		return pmf;
	}
	
	public static PersistenceManager getManager(){
		return pmf.getPersistenceManager();
	}

}
